package zxs.sino.elite.hub.enums.article;

import zxs.sino.elite.hub.enums.BaseEnum;

/**
 * 文章送信状态
 *
 * @author zhang
 */
public enum SentStatus implements BaseEnum<Integer> {

    SENT(0, "未送信"),
    UNSENT(1, "已送信");


    private final int code;
    private final String value;

    SentStatus(int code, String value) {
        this.code = code;
        this.value = value;
    }


    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getValue() {
        return value;
    }

    public static boolean isSent(Integer code) {
        return BaseEnum.isType(SentStatus.class, code, SENT);
    }

    public static boolean isUnsent(Integer code) {
        return BaseEnum.isType(SentStatus.class, code, UNSENT);
    }
}